﻿<%@ Page Title="New Staff - Delonix Regia" Language="C#" MasterPageFile="~/default.Master" AutoEventWireup="true" CodeBehind="NewStaff.aspx.cs" Inherits="DelonixRegia.NewStaff"%>

<asp:Content ID="Content4" ContentPlaceHolderID="cphPageTitle" runat="server">
    New Staff - Delonix Regia
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="cphTitle" runat="server">
    New Staff
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphSubtitle" runat="server">
    Create new Staff in Delonix Regia
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
    <div class="panel panel-default" style="width: 850px; margin: 0 auto;">
        <div class="panel-heading">Create new staff</div>

        <div class="panel-body">
            <div class="alert alert-danger" id="errorBox" style="display:none;">
            </div>
            <div class="alert alert-success" id="successBox" style="display: none;">
            </div>

            <table class="nav-justified">
                <tr>
                    <td>
                        <table style="width:350px;margin:auto;" class="nav-justified">
                            <tr>
                                <td class="text-left" style="width: auto">First Name:</td>
                                <td style="width: 15px">&nbsp;</td>
                                <td>
                                    <asp:TextBox ID="tbxFirstName" runat="server" CssClass="form-control" Width="187px" MaxLength="30"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-left" style="width: auto">Last Name:</td>
                                <td style="width: 15px">&nbsp;</td>
                                <td>
                                    <asp:TextBox ID="tbxLastName" runat="server" CssClass="form-control" Width="187px" MaxLength="30"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-left" style="width: auto">NRIC:</td>
                                <td style="width: 15px">&nbsp;</td>
                                <td>
                                    <asp:TextBox ID="tbxNRIC" runat="server" CssClass="form-control" Width="187px" MaxLength="9"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-left" style="width: auto">Date of Birth:</td>
                                <td style="width: 15px">&nbsp;</td>
                                <td>  
                                    <asp:TextBox ID="tbxDOB" runat="server" CssClass="form-control" Width="187px" MaxLength="11"></asp:TextBox>  
                                    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>
                                    <ajaxToolkit:CalendarExtender ID="CalendarExtenderDOB" TargetControlID="tbxDOB" runat="server" Format="dd-MM-yyyy"></ajaxToolkit:CalendarExtender>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-left" style="width: auto">Bank Account No.:</td>
                                <td style="width: 15px">&nbsp;</td>
                                <td>
                                    <asp:TextBox ID="tbxBankNo" runat="server" CssClass="form-control" Width="187px" MaxLength="10"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-left" style="width: auto">Home Address:</td>
                                <td style="width: 15px">&nbsp;</td>
                                <td>
                                    <asp:TextBox ID="tbxHomeAddress" runat="server" CssClass="form-control" Width="187px" MaxLength="30"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-left" style="width: auto">Phone No.:</td>
                                <td style="width: 15px">&nbsp;</td>
                                <td>
                                    <asp:TextBox ID="tbxPhoneNo" runat="server" CssClass="form-control" Width="187px" MaxLength="8"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-left" style="width: auto">Email Address:</td>
                                <td style="width: 15px">&nbsp;</td>
                                <td>
                                    <asp:TextBox ID="tbxEmail" runat="server" CssClass="form-control" Width="187px" MaxLength="30"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-left" style="width: auto">Duty Type:</td>
                                <td style="width: 15px">&nbsp;</td>
                                <td>
                                     <asp:DropDownList ID="ddlDutyType" runat="server" CssClass="form-control" Width="187px">
                                         <asp:ListItem Selected="True" Value="1">General Maintenance</asp:ListItem>
                                         <asp:ListItem Value="2">Room Maintenance</asp:ListItem>
                                         <asp:ListItem Value="3">Estate Maintenance</asp:ListItem>
                                         <asp:ListItem Value="4">Security Maintenance</asp:ListItem>
                                     </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="text-right" style="color: gray;"><hr /></td>
                </tr>
                <tr>
                    <td class="text-right" style="text-align:center;">
                        <asp:Button ID="btnCreateStaff" runat="server" Text="Create New Staff" CssClass="btn btn-default btn-lg" OnClick="btnCreateStaff_Click" />
                        <ajaxToolkit:ConfirmButtonExtender ID="btnCreateStaff_ConfirmButtonExtender" runat="server" ConfirmText="Are you sure you want to create new staff?" Enabled="True" TargetControlID="btnCreateStaff"></ajaxToolkit:ConfirmButtonExtender>
                    </td>
                </tr>
                </table>
        </div>
    </div>

    <script type="text/javascript">

        $('#cphMain_tbxFirstName').keydown(errorBoxHide);
        $('#cphMain_tbxLastName').keydown(errorBoxHide);
        $('#cphMain_tbxNRIC').keydown(errorBoxHide);
        $('#cphMain_tbxDOB').keydown(errorBoxHide);
        $('#cphMain_tbxBankNo').keydown(errorBoxHide);
        $('#cphMain_tbxAddress').keydown(errorBoxHide);
        $('#cphMain_tbxPhoneNo').keydown(errorBoxHide);
        $('#cphMain_tbxEmail').keydown(errorBoxHide);
        $('#cphMain_ddlDutyType').change(errorBoxHide);

        function errorBoxHide() {
            $('#errorBox').hide();
            $('#successBox').hide();
        }

    </script>
</asp:Content>